package com.example.animdemo.render;

public class SpriteSheet {
	private int[][] mTextureRegions;
	
	public SpriteSheet(int[][] textureRegions)
	{
		initWith(textureRegions);
	}
	
	public SpriteSheet initWith(int[][] textureRegions) 
	{
		mTextureRegions = textureRegions;
		return this;
	}
	
	public QuadBitmap getFrame(QuadBitmap bitmap, int frameIndex) {
		bitmap.setCropTex(mTextureRegions[frameIndex][0],
				mTextureRegions[frameIndex][1], 
				mTextureRegions[frameIndex][2], 
				mTextureRegions[frameIndex][3]);
		return bitmap;
	}
}
